package com.liyong.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liyong.demo.entity.User;
import org.apache.ibatis.annotations.*;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


public interface UserMapper extends BaseMapper<User> {

//    @Select("SELECT * FROM sys_user")
//    List<User> findAll();

//    @Insert("INSERT INTO sys_user(username,password, nickname, email,phone, address) VALUES (#{username}," +
//            "#{password},#{nickname},#{email},#{phone},#{address})")
//    int insert(User user);
//
//    @Update("update sys_user set username= #{username},password=#{password},nickname=#{nickname}," +
//            "email=#{email},phone=#{phone},address=#{address} where id = #{id}")
//    int update(User user);


//    Integer delete(@PathVariable Integer id);

//    @Select("select * from sys_user where username like concat('%',#{username},'%') limit #{pageNum}, #{pageSize}")
//    List<User> selectPage(Integer pageNum,Integer pageSize,String username);
//
//    @Select("select count(*) from sys_user ")
//    Integer selectTotal();


}
